Loading TOC...

GET /v1/config/transforms/{name}

Summary

Retrieve the XQuery, XSLT, or JavaScript implementation installed for the named transform.

Request Headers
Accept? The MIME type of the data expected in the response. One of application/xslt+xml, application/xquery, or application/vnd.marklogic-javascript.
Response Headers
Content-Type The MIME type of the data in the response. One of application/xslt+xml, application/xquery, or application/vnd.marklogic-javascript.

Response

Upon success, MarkLogic Server responds with status 200 (OK) and returns the transform implementation in the response body.

Required Privileges

This operation requires the rest-admin role, or the following privileges:

http://marklogic.com/xdmp/privileges/rest-admin

http://marklogic.com/xdmp/privileges/rest-writer

http://marklogic.com/xdmp/privileges/rest-reader

Usage Notes

For details, see Retrieving the Implementation of a Transformation in the REST Application Developer's Guide.

To install a transform, use PUT /v1/config/transforms/{name}. To retrieve a list of available transforms use GET /v1/config/transforms.

Example

$ curl --anyauth --user user:password -X GET -i \
    -H "Accept: application/xquery" \
    http://localhost:8004/v1/config/transforms/example

==> The XQuery library module implementing the "example" transform.
    For example:

Server: MarkLogic
Content-Type: text/xml; charset=UTF-8
Content-Length: 211
Connection: close

HTTP/1.1 200 OK
Content-type: application/xquery
Server: MarkLogic
Content-Length: 508
Connection: close

xquery version "1.0-ml";
module namespace example="http://marklogic.com/rest-api/transform/example";
declare function example:transform(
...
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.